
#include "Locker.h"

Locker::Locker(){
    pthread_mutex_init(&myMutex, NULL);
    pthread_cond_init(&myCondition, NULL);
}

void Locker::Lock(){
    pthread_mutex_lock(&myMutex);
}

void Locker::Unlock(){
    pthread_mutex_unlock(&myMutex);
}

void Locker::wait(){
    pthread_cond_wait(&myCondition,&myMutex);
}

void Locker::notify(){
    pthread_cond_signal(&myCondition);
}

pthread_mutex_t Locker::myMutex;